package com.java.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.java.dao.MailDao;
import com.java.model.Mail;
import com.java.model.PageBean;
import com.java.service.MailService;

@Service("mailService")
public class MailServiceImpl implements MailService{

	@Resource
	private MailDao mailDao;
	
	@Override
	public List<Mail> find(PageBean pageBean, Mail s_mail) {
		return mailDao.find(pageBean, s_mail);
	}

	@Override
	public int count(Mail s_mail) {
		return mailDao.count(s_mail);
	}

	@Override
	public void add(Mail mail) {
		mailDao.add(mail);
	}

	@Override
	public void update(Mail mail) {
		mailDao.update(mail);
	}

	@Override
	public void delete(int id) {
		mailDao.delete(id);
	}

	@Override
	public Mail loadById(int id) {
		return mailDao.loadById(id);
	}

}
